import java.util.HashSet;
import java.util.Random;
import java.util.Set;

/**
 * Creat with IntelliJ IDEA
 * Description
 * User: mamba24
 * Date: 2022-07-03
 * Time: 16:59
 * To BE A Better Person-2020-3-2
 */
public class TestDemo {
    /**
     * 十万个数据，去掉重复数据
     * @param arr
     */
    public static void func1(int[] arr){
        Set<Integer> hashset=new HashSet<>();
        for (int i = 0; i < arr.length; i++) {

                hashset.add(arr[i]);

        }

    }
    public static void main(String[] args) {
        int[] arr=new int[1_00000];
        Random random=new Random(1000);
        for (int i = 0; i < arr.length; i++) {
            arr[i]= random.nextInt();
        }
        func1(arr);
    }
}
